/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package csp;

/**
 *
 * @author Leandro
 */
public class RestriccionPotencia extends Restriccion {
    private double potencia;
    
    public boolean verifica(){

        double pTotal=0.0;
        Antena antena;
        for(Variable v:variablesRestringidas){
            antena=(Antena)v.getAsignado();
            pTotal+=antena.getPotencia();
        }
        if(pTotal>potencia){
        return false;
        }else{
        return true;
        }
    }

    

    


}
